<?php

/**
 * 更新前端自定义分类下热门的wiki图片
 */

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';

use Biz\model\ShopCategoryClassify as mShopCategoryClassify;
use Biz\service\wiki\ClassifyList;

$sec_ids = mShopCategoryClassify::selectInfos(['deep' => 2], ['id']);
if ($sec_ids && is_array($sec_ids)) {
    foreach ($sec_ids as $row) {
        $sec_cate_id = $row['id'];
        //开始设置二级类目
        ClassifyList::setWikiInfoByCateId($sec_cate_id);
    }
}